package com.sfj.system.mapper;

import com.sfj.system.dto.task.ProblemCheckDTO;
import com.sfj.system.entity.ProblemProcessEntity;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;
import java.util.List;

/**
 * @author kaka
 * @Date 2025/07/07
 */
public interface ProblemProcessMapper {
    int insert(ProblemProcessEntity ProblemProcessEntity);
    int update(ProblemProcessEntity ProblemProcessEntity);
    int updStatus(ProblemProcessEntity ProblemProcessEntity);
    int delete(Integer problemId);
    ProblemProcessEntity selectById(@Param("problemId") Integer problemId,@Param("taskId") Integer taskId,
                                    @Param("userId")Integer userId);
    List<ProblemCheckDTO> selectByTaskId(Integer taskId);
    List<ProblemProcessEntity> selectByUserId(Integer userId);
    int batchInsert(List<ProblemProcessEntity> list);
    List<ProblemProcessEntity> selectByCondition(ProblemProcessEntity condition);

    int countByNotReviewed(Integer taskId);
    int countByNotReviewedByUserId(@Param("taskId")Integer taskId,@Param("userId") Integer userId);

    void updateRectifyDate(@Param("taskId")Integer taskId, @Param("userId") Integer userId
            , @Param("rfDate") LocalDateTime rfDate);
}
